package com.huika.renrench.support.bean;

import java.io.Serializable;
import java.util.ArrayList;

import com.huika.lib.utils.MoneyShowTool;
import com.huika.renrench.control.main.shoptf.gallery.ProductImageArray;

/**
 * 
 * @description：店铺转让实体类
 * @author zc
 * @date 2015年6月3日 上午11:30:19
 */
public class ShopTransferListBean implements Serializable {

	private static final long serialVersionUID = 1L;
	public String shopName;// 店铺名称
	public String price;// 租金
	public String nearby;// 临近
	public Double distance;// 距离
	public Double acreage;// 面积
	public String introduction;// 店铺简介
	public String phone;// 联系电话
	public String headImg;// 商家头像
	public Double latitude;// 纬度
	public Double longitude;// 经度
	public ArrayList<ProductImageArray> imageArray;// 晒单图片

	public String shopId;// 店铺ID
	public String merchantId;// 商家ID
	public String id;
	public String thumbImg;
	public String name;
	public String defaultImage;
	public String area;
	public String areaName;
	public String address;
	public String updateDT;
	public String checkStatus;
	public boolean isAttention;
	public String changeType;//转让费
	public String areaId;
	public String checkRemark;
	public String iDPath;
	public String namePath;
	
	
//	 "id": null,
//     "thumbImg": "",
//     "acreage": 15,
//     "name": null,
//     "shopName": "（出租）深圳龙岗义乌小商品批发城旺铺出租",
//     "defaultImage": "http://image.app.renrench.com/rrc1/M00/00/10/CqvBj1VmgASAHjScAAEUwcHWrgU766=253x168.jpg",
//     "price": "null",
//     "nearby": "双龙地铁 ",
//     "area": null,
//     "distance": 30.2,
//     "shopId": 123,
//     "merchantId": -1,
//     "introduction": null,
//     "phone": null,
//     "headImg": null,
//     "address": "龙岗义乌小商品批发城 ",
//     "updateDT": "2015-06-29 17:15:42",
//     "checkStatus": "2",
//     "isAttention": null,
//     "areaId": null,
//     "checkRemark": null,
//     "iDPath": null,
//     "namePath": null,
//     "areaName": null,
//     "changeType": "0",
//     "latitude": null,
//     "longitude": null,
//     "imageArray": null
	public String getDistance() {
		if (distance < 0.1) {
			return 0.1 + "km";
			
		} else if(distance<1&&distance>0.1){
			return distance + "km";
		}else{
			return MoneyShowTool.nolastDF(distance) + "km";
		}
	}
	
	public String getPrice() {
		Double pri=0.0;
		if (!price.equals("null")) {
			pri= Double.valueOf(price);
		}
		if (pri < 10000) {
			return MoneyShowTool.nolastDF(pri);
		} else {
			return MoneyShowTool.nolastDF(pri / 10000) + "万";
		}
	}
	
	public String getPrice2() {
		Double pri=0.0;
		if (!price.equals("null")) {
			pri= Double.valueOf(price);
		}
		if (pri < 10000) {
			return MoneyShowTool.twolastDF(pri);
		} else {
			return MoneyShowTool.twolastDF(pri / 10000) + "万";
		}
	}
	
	public String getAcreage() {
		if (acreage < 10000) {
			return MoneyShowTool.nolastDF(acreage);
		} else {
			return MoneyShowTool.nolastDF(acreage / 10000) + "万";
		}
	}

}
